package com.gitee.wsl.ext.collection

 fun <T> Collection<Collection<T>>.intersectAll(): Set<T> =
    fold(flatten().toSet()) { x, y -> x.intersect(y.toSet()) }

 internal fun <T> intersectAll(vararg args: Collection<T>): Set<T> = args.toList().intersectAll()
